package com.peak.distribution.repository.order;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.peak.distribution.entity.order.DisOrder;
import com.peak.spring.boot.api.repository.BaseRepository;

public interface DisOrderDao extends BaseRepository<DisOrder> {

	@Query("select count(o.id), o.status from DisOrder o where o.agent.id = :agentId group by o.status")
	List<Object[]> countOrderByStatus(@Param("agentId") Integer agentId);
}
